Add atomic Resource proposal publication - #409
Conversation
|
@codex please review this PR. Posted on behalf of @schickling
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c778bbca7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
agent-identity: dev3.direct.omp.2cshu64q agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.9 agent-runtime: OMP 18.0.9 tooling-profile: dotfiles@b607597
agent-identity: dev3.direct.omp.2cshu64q agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.9 agent-runtime: OMP 18.0.9 tooling-profile: dotfiles@b607597
3c778bb to
74edcf0
Compare
|
@codex review Posted on behalf of @schickling
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74edcf035a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| prepared | ||
| .commit() | ||
| .map_err(PublicationTransactionError::Publication)?; |
There was a problem hiding this comment.
Make carrier and catch-up state atomically visible
If the process exits at the provided after-carrier-before-state checkpoint, the carrier rename is already durable while CatchUpState still describes the prior revision and intent. Direct carrier readers—and callers using CatchUp::open without reconciliation—can therefore observe a mixed successor/prior state indefinitely until a later reconciliation, contradicting the new atomic-publication guarantee and potentially exposing new resource data before its invalidation is durable. Publish both pieces behind one atomic indirection, or require every reader to participate in the same lock/reconciliation protocol.
Useful? React with 👍 / 👎.
Problem
Observable Resource providers need to publish a carrier and its delivery intent as one fenced operation. Separate writes can lose invalidation, replay stale work, or wedge after a crash.
Goal
Provide a reusable proposal commit primitive with generation, revision, and prior-digest compare-and-swap semantics.
Decisions
Verification
CI=1 nix develop -c cargo test -p st2-resource-protocolCI=1 nix develop -c cargo test --lib resource_profileCI=1 nix develop -c cargo test --test invariantsaxe vrs check --profile strict docs/vrs/07-resource-profileAll commands passed locally. Tests cover crash recovery, lost acknowledgements, multiprocess contention, stale fences, divergence recovery, and legacy intent migration.
Complexity
The persistent lock and intent record are necessary to make carrier publication and notification one recoverable transaction across process crashes.
Concerns
This PR changes the durable proposal intent schema. The implementation includes explicit migration coverage for predecessor intents.
Friction & bottlenecks
The repository has no
devenvtask graph, so validation uses its Cargo and Nix gates directly.Follow-ups
The next PR in stack #412 adds the universal WASIp2 executor that consumes this primitive.
References
Posted on behalf of @schickling
agent_identitysessionagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimetooling_profile